﻿using System.Linq;

namespace MsmqView.Core.Messaging
{
	public class QueueName
	{
		#region Private Fields
		private readonly string fullName;
		private readonly string qualifier;
		#endregion

		#region Properties
		public string FriendlyName { get; private set; }
		
		public string Qualifier 
		{
			get { return qualifier; }
		}
		
		public string FullName 
		{
			get { return fullName; } 
		}
		#endregion

		#region Constructors
		public QueueName(string fullName, string qualifier)
		{
			this.fullName = fullName;
			this.qualifier = qualifier;

			FriendlyName = fullName.Substring(qualifier.Count());
		}
		#endregion
	}
}
